package com.juc.threadPoolExecutor.threadPoolExecutor16;

import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.TimeUnit;

public class Run {
    /**
     * afterExecute
     * beforeExecute 
     * 对线程池中执行的线程对象实现监控
     * @param args
     */
	public static void main(String[] args) {
		MyThreadPoolExecutor executor = new MyThreadPoolExecutor(2, 2, Integer.MAX_VALUE, TimeUnit.SECONDS, new LinkedBlockingDeque<Runnable>());
		executor.execute(new MyRunnable("A1"));
		executor.execute(new MyRunnable("A2"));
		executor.execute(new MyRunnable("A3"));
		executor.execute(new MyRunnable("A4"));
	}
}
